#include<bits/stdc++.h>
using namespace std;
int n,a[100005];
bool check[100005];
int sum[100005],maxn,temp,attack[100005];
int v[100005];
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    bool flag=0;
    for(int i=1;i<=n;i++){
        cin>>a[i];
        sum[a[i]]++;
        if(sum[a[i]]>1)
        flag=1;
        attack[a[i]]++;
        if(!check[a[i]]){
            check[a[i]]=1;
            v[++temp]=a[i];
            maxn=max(maxn,a[i]);
        }
    }
    if(!flag){
        cout<<1;
        return 0;
    }
    sort(v+1,v+temp+1);
    int l,r,ans=n;
    l=1;
    r=2;
    while(l<r&&r<=temp){
        if(attack[v[r]]>=sum[v[l]]){
            attack[v[r]]-=sum[v[l]];
            ans-=sum[v[l]];
            sum[v[l]]=0;
            l++;
            if(l==r)
            r++;
        }
        else{
            sum[v[l]]-=attack[v[r]];
            ans-=attack[v[r]];
            attack[v[r]]=0;
            r++;
        }
    }
    cout<<ans;
    return 0;
}
